<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<style>
			span.DataTables_sort_icon.css_right.ui-icon.ui-icon-carat-2-n-s{display:none;}
	</style>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<script type="text/javascript">
		var aJaxURL = "server-side/pos/pos.action.php";			//server side folder url
		var seoyURL = "server-side/seoy/seoy.action.php";	    //server side folder url
		var tName 	= "pos-table";								//table name
		var fName 	= "pos-form";                               //form name							
		var menuLength = [[100], [100]];
		var dialogButton = {
	        "save": {
	            text: "არჩევა",
	            id: "save-pos-select",
	            click: function () {
	            }
	        }
	    };
		var oID		= 0;
		
		$(document).ready(function (){
			AjaxSetup1();
			SelectPOS();
			GetDialog("pos-select-form", 400, "auto", dialogButton);

			SeoY("seoy-input", seoyURL, "pos", "", 1) ;
			
			
			$("#navigate").hide();
			$("#pos-wrapper").hide();
			
			$("#seoy_button").button({
	            icons: {
	                primary: "ui-icon-plusthick"
	            }
        	});
        	
			$("#save_button").button({
	            icons: {
	                primary: "ui-icon-disk"
	            }
        	});
        	
			$("#cancel_button").button({
	            icons: {
	                primary: "ui-icon-closethick"
	            }
        	});
        	    	
			$("#add_payment").button({
	            icons: {
	                primary: "ui-icon-check"
	            }
        	});

        	
			$("#print_button").button({
	            icons: {
	                primary: "ui-icon-print"
	            }
           
        	});

			GetMainMenu();
			GetTransactions();
			//on number change send requests to get auto number history
			
			$( ".car_num" ).keyup(function(e) {

				param = new Object();
			
				param.act		= 'get_auto_history';
				param.obj_id	= $("#obj_id :selected").val();
				param.car_numb  = $( "#auto_number" ).val();
				
				$.ajax({
					url: aJaxURL,
					data: param,
					success: function(data) {
						if (typeof (data.error) != "undefined") {
	                        if (data.error != "") {
	                            alert(data.error);
	                        } else {
	    						$("#auto_number1").html(data.auto_history);
	                        }
	                    }
					}
				});
				
			});
		
// 			$("#auto_number").keyboard({

// 				 display: {
// 				  'bksp'   : '\u2190',
// 				  'enter'  : 'return',
// 				  'default': 'ABC',
// 				  'accept' : '\u21d3'
// 				 },

// 				 layout: 'custom',

// 				 customLayout: {

// 				  'default': [
// 				   'Q W E R T Y U I O P {sp:1} 7 8 9 {bksp}',
// 				   'A S D F G H J K L {sp:1} {sp:1} 4 5 6 -',
// 				   'Z X C V B N M {sp:1} {sp:1} {accept} {sp:1} 1 2 3 0'
// 				  ]
// 				 }
				 

// 			});
			
// 			$("#quantity").keyboard({

// 				 display: {
// 				  'bksp'   : '\u2190',
// 				  'enter'  : 'return',
// 				  'default': 'ABC',
// 				  'accept' : '\u21d3'
// 				 },

// 				 layout: 'custom',

// 				 customLayout: {

// 				  'default': [
// 				   '1 2 3',
// 				   '4 5 6',
// 				   '7 8 9',
// 				   '0 {bksp} {accept}'
// 				  ]
// 				 }

// 			});



		});



		function SelectPOS(){
			$.ajax({
				url: aJaxURL,
				data: "act=select_pos",       
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
                        	$("#pos-select-form").html(data.page);
                        }
                    }
				}
			});
		}
		
		function LoadDialog(){		
		    $("#" + fName).dialog({
		        resizable:     false,
		        draggable:     false,		       
		        width:         1337,
		        height:        900,
		        modal:         false,
		        stack:         true,
                sticky:        false,
                closeOnEscape: false,
                dialogClass:   "pos-dialog"
		    });
		}
		
		function LoadTable(){
			/* Table ID, aJaxURL, Action, Colum Number, Custom Request, Hidden Colum, Menu Array */
			GetDataTable(tName, aJaxURL, "get_list", 5, "obj_id=" + oID, 0, menuLength, 0, "asc");					
		}


		$(document).on("click", "#save-pos-select", function() {		
			oID		= $("#obj_id :selected").val();
			oName	= $("#obj_id :selected").text();
			$("#" + fName).attr("title", oName);
			
			LoadDialog();
			LoadTable();
			
			GetQuantity(oID);
			GetSumPrice(oID);
			
			$("#pos-wrapper").fadeIn("slow");
			$("#seoy-input").focus();
			$("#pos-select-form").dialog("close");
			GetTransactions2();
		});

		$(document).on("click", "#save_button", function() {	
			var obj_id	= oID;
			var car_number	= $("#auto_number").val().toUpperCase();
			
			if(parseInt($('#pos-table tbody tr td').children().length) === 0){ 
				GetAlertDialog("production-empty");
				
			}else{
				$.ajax({
					url: aJaxURL,
					data: "act=save_transaction&obj_id=" + obj_id + "&car_number=" + car_number,
					success: function(data) {
						if (typeof (data.error) != "undefined") {
	                        if (data.error != "") {
	                            alert(data.error);
	                        } else {
	    						GetQuantity(obj_id);
	    						GetSumPrice(obj_id);
	    						LoadTable();
	    						GetTransactions2();
	    						$("#auto_number").val("");
	    						$("#auto_number1").html("");
	    						GetMainMenu();
	                        }
	                    }
					}
				});
			}
		});

		$(document).on("click", "#cancel_button", function() {
			var obj_id	= oID;
			var col =  parseInt($("tr.odd").text());

			
			if(!isNaN(col)){
				$.ajax({
					url: aJaxURL,
					data: "act=abort_transaction&obj_id=" + obj_id,        
					success: function(data) {
						if (typeof (data.error) != "undefined") {
	                        if (data.error != "") {
	                            alert(data.error);
	                        } else {
	    						GetQuantity(obj_id);
	    						GetSumPrice(obj_id);						
	    						LoadTable();
	    						GetTransactions2();
	                        }
	                    }
					}
				});  
			}      
			});

		$(document).on("click", ".pos-prod-delete", function() {
			var trans_id  = $(this).text();
			var obj_id	= oID;
			
			$.ajax({
				url: aJaxURL,
				data: "act=delete_prod&trans_id=" + trans_id + "&obj_id=" + obj_id,        
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
    						GetQuantity(obj_id);
    						GetSumPrice(obj_id);
    						LoadTable();
                        }
                    }
				}
			});
		});

// 		$(document).on("keypress", "#sum-total-price2", function(e) {

// 			if(e.which == 13){		
// 				MakePayment();
// 			}
// 		});
		

// 		$(document).on("click", "#add_payment", function() {		
			
// 					MakePayment();		
					
// 		});

		$(document).on("keypress", "#seoy-input", function() {
			if ( event.which == 13 ) {
				$("#seoy_button").click();
				$("#seoy-input").autocomplete("close");
			}
		});

		$(document).on("keyup", "#sum-total-price2", function() {
			var change = parseFloat((parseFloat($("#sum-total-price2").val()) - parseFloat($("#sum-price2").text()))).toFixed(2);
			if(change > 0){
			$("#change").text(change);
			}else{
				$("#change").text("0.00");
			}
			
		});
	
		$(document).on("click", ".restore_suspend_button", function() {
			var obj_id	= oID;
			var trans_id = $(this).attr("trans");
			
			$.ajax({
				url: aJaxURL,
				data: "act=restore_suspended&obj_id=" + obj_id + "&trans_id=" + trans_id,       
				success: function(data) {
					if (data.error != "") {
                        alert(data.error);
                    } else {
						GetTransactions2();
						GetQuantity2(obj_id);
						GetSumPrice2(obj_id, trans_id);
 						$("#pos-payment-form").html(data.page);	
 						$("#add_payment").button({
 				            icons: {
 				                primary: "ui-icon-check"
 				            }
 			        	});				  
                    }
				}
			});

			var button = {
			        "cancel": {
			            text: "დახურვა",
			            id: "suspend-dialog",
			            click: function () {
// 			    			if(confirm("დარწმუნებული ხართ, რომ გსურთ დახურვა?"))
							var close_button = {
							        "save": {
							            text: "დიახ",
							            id: "close-confirm",
							            click: function () {
							            	$(this).dialog("close");
							            }
							        },	
							        "cancel": {
							            text: "არა",
							            id: "cancel-dialog",
							            click: function () {
							                $(this).dialog("close");
							            }
							        }
							}
			                GetConfirmDialog("sure-to-confirm", close_button);

			                 $(document).on("click", "#close-confirm", function() {
			    				jQuery('#pos-payment-form').dialog('close');
			                 }); 
			            }
			        }
			    };
				GetDialogPay("pos-payment-form", 300, "auto", button);
		});
		
// 		$(document).on("click", ".cancel_suspend_button", function() {
// 			var obj_id	= oID;
// 			var trans_id = $(this).attr("trans");

// 			if(confirm("დარწმუნებული ხართ რომ გსურთ ტრანზაქციის წაშლა?")){
// 				$.ajax({
// 					url: aJaxURL,
// 					data: "act=cancel_suspend&trans_id=" + trans_id,       
// 					success: function(data) {
// 						if (data.error != "") {
// 	                        alert(data.error);
// 						} else {
// 							GetTransactions();
// 	                    }
// 					}
// 				});
// 			}
// 		});
		
		function GetMainMenu(){
			$.ajax({
				url: aJaxURL,
				data: "act=get_main_menu",     
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
                        	$("#main_menu").html(data.page);	
                        }
                    }
				}
			});
		}
		
		$(document).on("click", ".main", function() {
			var id = $(this).attr("id");

			$.ajax({				
				url: aJaxURL,
				data: "act=get_sub_menu&id=" + id,      
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
                        	$("#main_menu").html(data.page);        	
                        }
                    }
				}
			});
			
		});
		
		//click on production
		
		$(document).on("click", ".productions", function() {	
			var obj_id	= oID;
			var prod_id = $(this).attr("id");
			
			$.ajax({
				url: aJaxURL,
				data: "act=prod_ing_page&obj_id=" + obj_id + "&prod_id=" + prod_id,       
				success: function(data) {
					if (data.error != "") {
                        alert(data.error);
                    } else {
	                	$("#pos-production-form").html(data.page);
	                	RecipieSpinner();
                    }
				}
			});
			
			var button = {
		        "save": {
		            text: "დამატება",
		            id: "save-dialog",
		            click: function () {
		            }
		        },	
		        "cancel": {
		            text: "დახურვა",
		            id: "cancel-dialog",
		            click: function () {
		                $(this).dialog("close");
		            }
		        }
		    };
		    
			GetDialog("pos-production-form", 590, "auto", button);

	});	
		
		
  // click on name
   $(document).on("click", ".production_name", function() {	
				var obj_id	= oID;
				var prod_id = $(this).attr("id");
				
				$.ajax({
					url: aJaxURL,
					data: "act=prod_ing_page&obj_id=" + obj_id + "&prod_id=" + prod_id,       
					success: function(data) {
						if (data.error != "") {
	                        alert(data.error);
	                    } else {
		                	$("#pos-production-form").html(data.page);
		                	RecipieSpinner();
	                    }
					}
				});
				

				
				
				var button = {
			        "save": {
			            text: "დამატება",
			            id: "save-dialog",
			            click: function () {
			            }
			        },	
			        "cancel": {
			            text: "დახურვა",
			            id: "cancel-dialog",
			            click: function () {
			                $(this).dialog("close");
			            }
			        }
			    };
			    
				GetDialog("pos-production-form", 590, "auto", button);
		});	
			
   //click on price
			
	$(document).on("click", ".production_price", function() {	
				var obj_id	= oID;
				var prod_id = $(this).attr("id");
				
				$.ajax({
					url: aJaxURL,
					data: "act=prod_ing_page&obj_id=" + obj_id + "&prod_id=" + prod_id,       
					success: function(data) {
						if (data.error != "") {
	                  alert(data.error);
	              } else {
		                	$("#pos-production-form").html(data.page);
		                	RecipieSpinner();
	              }
					}
				});
				

				
				
				var button = {
			        "save": {
			            text: "დამატება",
			            id: "save-dialog",
			            click: function () {
			            }
			        },	
			        "cancel": {
			            text: "დახურვა",
			            id: "cancel-dialog",
			            click: function () {
			                $(this).dialog("close");
			            }
			        }
			    };
			    
				GetDialog("pos-production-form", 590, "auto", button);

		});				
		// save button
	    $(document).on("click", "#save-dialog", function () {
		    	param = new Object();	    	
	            //Action
		    	obId	= $("#obj_id :selected").val();
		    	
		    	param.act			= "add_prod";		

		    	param.obj_id		= $("#obj_id :selected").val();
			    param.id         	= $("#prod_id").html();
			   	param.quantity		= $("#prod_quantity").val();
// 			   	param.car_number	= $("#auto_number").val();
			   	param.price			= 0;
				
			   	/*  ARRAY OF PRODUCTION */
			    var array = new Array();
			    
			
		    	$("tr.trCheckClass1").each(function(){
					$this = $(this)
				    var value = $this.find("span.id_value").html();				    
		    		array.push(Array($("#type_"+value).text(), $("#quantity_"+value).val(), $("#ingr_quantity_"+value).val()));
		    	});
		    	param.list	= JSON.stringify(array);
				var checkedArray = myEmptyArray(array);
				
				if(!checkedArray && !empty(array)){
					GetAlertDialog("no-ingredients");
				}else {
						
				    $.ajax({
				        url: aJaxURL,
					    data: param,
				        success: function(data) {
							if(typeof(data.error) != "undefined")
							{
								if(data.error != "")
								{
									alert(data.error);
								}else
								{
									GetQuantity(obId);
									GetSumPrice(obId);
									LoadTable("pos-container-table");
					        		CloseDialog("pos-production-form");					        		
								}
							}
					    }
				    });
				}
			});

		

		$(document).on("click", "#backTop", function() {
			GetMainMenu();		
		});

		function GetQuantity(obj_id){
			$.ajax({
				url: aJaxURL,
				data: "act=get_prod_count&obj_id=" + obj_id,        
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
                            if(empty(data.prod_count))
                        		$("#prod-quantity").text(0);
                            else
                        		$("#prod-quantity").text(data.prod_count);
                        }
                    }
				}
			});
		}		
				
		function GetSumPrice(obj_id){
			$.ajax({
				url: aJaxURL,
				data: "act=get_sum_price&obj_id=" + obj_id,        
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
                            if(empty(data.sum_price)){
        						$("#sum-price").text("00.00");
        						$("#sum-total-price").val("00.00");
                            } else{
        						$("#sum-price").text(data.sum_price);
        						$("#sum-total-price").val(data.sum_price);
                            }
                        }
                    }
				}
			});
		}

		function GetQuantity2(obj_id){
			$.ajax({
				url: aJaxURL,
				data: "act=get_prod_count_2&obj_id=" + obj_id,        
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
                            if(empty(data.prod_count))
                        		$("#prod-quantity2").text(0);
                            else
                        		$("#prod-quantity2").text(data.prod_count);
                        }
                    }
				}
			});
		}		
				
		function GetSumPrice2(obj_id, trans_id){
			$.ajax({
				url: aJaxURL,
				data: "act=get_sum_price_2&obj_id=" + obj_id + "&trans_id=" + trans_id,        
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {
                            if(empty(data.sum_price)){
        						$("#sum-price2").text("00.00");
        						$("#sum-total-price2").val("00.00");
                            } else{
        						$("#sum-price2").text(data.sum_price);
        						$("#sum-total-price2").val(data.sum_price);
        						$("#sum-total-price2").select();
                            }
                        }
                    }
				}
			});
		}

		function myEmptyArray(array) {
		    for(var i = 0; i < array.length; i++) {
		        if(array[i][1] != 0) {
		            return true;
		        }
		    }
		    return false;
		}

		$(document).on("click", "#print_button", function () {
	    	param = new Object();
	    	
            //Action
		    param.id	 = $("#obj_id :selected").val();
		    param.status = 4;
	    	var link = $(this).attr("str");
	    	link = "server-side/print/print.action.php?id=" + param.id + "&status=" + param.status;
	    	
	    	var newWin = window.open(link, "JSSite", "width=800,height=800,resizable=yes,scrollbars=yes,status=yes");
	    	newWin.focus();
	    	newWin.onload = function() {
	    		newWin.print();
	    		setInterval(function(){newWin.close()},500);
		    }
	    });

	    function printCheck(price){
 	    	param       = new Object();
 		    param.act   = "print_check";

 		    param.price = price;
				
			$.ajax({
				url: aJaxURL,
				data: param,        
				success: function(data) {
					if (typeof (data.error) != "undefined") {
                        if (data.error != "") {
                            alert(data.error);
                        } else {

                        	var el = document.getElementById('bt1');
                        	if (document.createEvent) {
                        	    var event = document.createEvent("MouseEvents");
                        	    event.initEvent("click", true, true);
                        	    el.dispatchEvent(event);
                        	}
                        	
                       }
                    }
				}
			});		    
	    }

		function GetTransactions2(){
			var obj_id	= oID;
			
			$.ajax({
				url: aJaxURL,
				data: "act=suspended_page&obj_id=" + obj_id,       
				success: function(data) {
					if (data.error != "") {
	                    alert(data.error);
	                } else {
	                	$("#pos-transactions-form").html(data.page);
	          			$( ".restore_suspend_button" ).button({
	        			      icons: {
	        			        primary: "ui-icon-arrowreturnthick-1-s"
	        			      }
	        			});
	          			$( ".cancel_suspend_button" ).button({
	        			      icons: {
	        			        primary: "ui-icon-trash"
	        			      }
	        			});
	                }
				}
			});
		}

		function GetTransactions(){
			var obj_id	= oID;
			
			$.ajax({
				url: aJaxURL,
				data: "act=suspended_page&obj_id=" + obj_id,       
				success: function(data) {
					if (data.error != "") {
	                    alert(data.error);
	                } else {
	                	$("#pos-transactions-form").html(data.page);
	          			$( ".restore_suspend_button" ).button({
	        			      icons: {
	        			        primary: "ui-icon-arrowreturnthick-1-s"
	        			      }
	        			});
	          			$( ".cancel_suspend_button" ).button({
	        			      icons: {
	        			        primary: "ui-icon-trash"
	        			      }
	        			});
	                }
				}
			}).done(function(data) { 
                setTimeout(GetTransactions, 2000);
            });
		}

		function GetDialogPay(fname, width, height, buttons) {

		    $("#" + fname).dialog({
		    	position:"right",
		        resizable: false,
		        width: width,
		        height: height,
		        modal: false,
		        stack: false,
		        closeOnEscape: false,
		        dialogClass: fname + "-class",
		        buttons: buttons,
		        open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
		    });

		}
		

		function GetAlertDialog(fname) {
			var button = {
			        "cancel": {
			            text: "დახურვა",
			            id: "cancel-dialog",
			            click: function () {
			                $(this).dialog("close");
			            }
			        }
			}	
			
		    $("#" + fname).dialog({
		    	position:"right",
		        resizable: false,
		        width: 230,
		        height: "auto",
		        modal: false,
		        stack: false,
		        closeOnEscape: false,
		        dialogClass: fname + "-class",
		        buttons: button,
		        open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
		    });
		}

		function GetConfirmDialog(fname, button){


				    $("#" + fname).dialog({
				    	position:"right",
				        resizable: false,
				        width: 250,
				        height: "auto",
				        modal: false,
				        stack: false,
				        closeOnEscape: false,
				        dialogClass: fname + "-class",
				        buttons: button,
				        open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
				    });
			        
		}

		
		function RecipieSpinner(){
	       	 $("tr.trCheckClass1").each(function() {
				 $this	   = $(this);
				 var value = $this.find("span.id_value").html();

				 if(($("#ingr_quantity_"+value).val()) ==  0){
					 $("#quantity_" + value).val(0);
				 }
			  
				  $("#increment_" + value).click(function(){ 

						$("#quantity_" + value).val(parseFloat($("#ingr_quantity_" + value).val() *  $("#id_quantity_" + value).val()*100/100).toFixed(3));
						
						 
				   });
				 
				  $("#decrement_" + value).click(function(){ 
						
						if( $("#ingr_quantity_" + value).val() !=0 ){
							$("#quantity_" + value).val(parseFloat($("#ingr_quantity_" + value).val() *  $("#id_quantity_" + value).val()*100/100).toFixed(3));
							} 	else {
										
						     $("#quantity_" + value).val(0);

									}									
						 }); 
				 							 
				});
		}

// 		function MakePayment(){
// 			var sum			= parseFloat($("#sum-price2").text());
// 			var total_sum	= parseFloat($("#sum-total-price2").val());
// 			var trans_id = $(".restore_suspend_button").attr("trans");	
// 			$("#auto_number").val("");

// 			if(confirm("დარწმუნებული ხართ ?")){			
// 					var obj_id	= oID;
									
// 					$.ajax({
// 						url: aJaxURL,
// 						data: "act=payment_done&obj_id=" + obj_id + "&trans_id=" + trans_id,        
// 						success: function(data) {
// 							if (typeof (data.error) != "undefined") {
// 		                        if (data.error != "") {
// 		                            alert(data.error);
// 		                        } else {
// 									GetQuantity(obj_id);
// 									GetSumPrice(obj_id);
// 									LoadTable();
// 									$("#sale_price").val(0);
// 									$("#seoy-input").val("");
// 									printCheck(sum);
// 									$('#pos-payment-form').dialog('close');
// 									GetTransactions();	
// 		                        }
// 		                    }
// 						}
// 					 });
// 		        }
			
// 		}
				
	</script>
	
	<style type="text/css">
		.dataTable_buttons{
			display: none;
		}
	</style>
</head>
<body onselectstart='return false;' ondragstart='return false';>
	<a  style="display: none;" id="bt1" href="media/print/DEFEXEC.txt" download>link</a>
	<div id="pos-wrapper">
	    <!-- jQuery Dialog -->
	    <div id="pos-select-form" class="form-dialog" title="სალაროს არჩევა">
	    </div>
	    
	    <!-- jQuery Dialog -->
	    <div id="pos-payment-form" class="form-dialog" title="გადახდა">
	    </div>    
	    
	     <!-- jQuery Dialog -->
	    <div id="pos-production-form" class="form-dialog" title="პროდუქტი">
	    </div>
	    
	   <!-- jQuery Dialog -->
	    <div id="production-empty" class="form-dialog" title="ინფო" style="text-align:center;"> პროდუქსიის სია ცარიელია!
	    </div>
	    
	   <!-- jQuery Dialog -->
	    <div id="total-sum" class="form-dialog" title="ინფო" style="text-align:center;"> თანხა არასაკმარისია!
	    </div>	
	    
	    <!-- jQuery Dialog -->
	    <div id="no-ingredients" class="form-dialog" title="ინფო" style="text-align:center;"> ინგრედიენტები არ არის!
	    </div>  
	    
	    <!-- jQuery Dialog -->
	    <div id="are-you-sure" class="form-dialog" title="ინფო" style="text-align:center;"> დარწმუნებული ხართ?
	    </div>  
	    
	    <!-- jQuery Dialog -->
	    <div id="sure-to-confirm" class="form-dialog" title="ინფო" style="text-align:center;"> დარწმუნებული ხართ, რომ გსურთ დახურვა?
	    </div>  
	   
	    <div id="pos-form" style="overflow:hidden">
	    	<table id="pos-container-table">
	    		
				<tr>
					<td style="width:400px !important; height:515px !important;">
						<div id="product-wrapper" class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"">
							<div>
					           	<p style="text-align: center; margin-top: 10px; font-size: 16px;">პროდუქტების სია</p>
							</div>
						
							 <div class="pos-inner-table">
							    <div id="dt_example" class="ex_highlight_row">
						            <div id="dynamic">
						                <table class="display" id="pos-table">
						                    <thead>
						                        <tr id="datatable_header">
						                   			<th>ID</th>
						                            <th width="100%">დასახელება</th>
						                            <th width="50px">ფასი</th>
						                            <th width="50px">რაოდ.</th>
						                            <th width="70px">ჯამი</th>
						                            <th class="check"></th>
						                        </tr>
						                    </thead>
						                </table>
						            </div>
						    	</div>
						    </div>
						</div>
						<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix" id="pos-table-footer"></div>
					</td>
					<td rowspan="2" width="8">&nbsp;</td>	
					<td rowspan="2" width="5">
						<div id="main-menu-container" style="width: 605px; height:605px; position:relative; overflow-x: scroll;"> 
							<table id="main_menu" style="width: 585px;" class="tableClass">							
							</table>
						</div>
					</td>
					<td rowspan="2">
					<table>			
							<tr id="pos-table-header"  style="padding-left: 0px !important; height:20px !improtant;">					
								<td style="height:20px !important;">		
									<button id="save_button" style="width:97px !important; margin-left:4px;" class="buttons"><span><p  style="font-size:12px !important;">შენახვ.</p></span></button>
									<button id="cancel_button" class="buttons" style="width:88px !important;"><span><p style="font-size:12px !important;">გაუქმ.</p></span></button>
									<button id="print_button" class="buttons" style="width:90px !important;"><span><p style="font-size:12px !important;">ბეჭდვა</p></span></button>
								</td>
							</tr>
						<tr>
<!-- 						<td style="height:20px !important;">
							<div id="sale_details" style="float: left;  margin-left:10px;">
								<table id="sales_items">
									<tr>
										<td class="left" style="height: 40px !important;"><pre style="font-size: 16px; margin-top: 8px;">რაოდენობა:        <span id="prod-quantity">0</span> ც</pre></td>			
									</tr>
								</table>
								<table id="sales_items_total">
									<tr>
										<td class="left" style="height: 40px !important;"><pre style="font-size: 16px; margin-top: 10px;">ჯამი:                	 <span id="sum-price">0.00</span> ლ</pre></td>
									</tr>
								</table>
							</div>						
							<div id="make_payment" style="float: left; margin-bottom: 0px;">
								<div id="pay_box">
									<input type="text" value="0.00" id="sum-total-price" size="10" style="font-size: 16px;" />
								</div>
								<div id="add_payment_button">
									<button id="add_payment">გადახდა</button>
								</div>
							</div>
						</td>
 -->
						</tr>
						<tr style="height:160px !important;">
						<td>
												<input type="text" placeholder="ავტ. ნომერი" id="auto_number" class="car_num" size="10" style="text-transform: uppercase; border: 1px solid #999; border-radius: 4px 4px 4px 4px; width: 100px; height: 32px; font-size: 16px; margin-left:10px;"/>
												<table id="auto_number1" style="float:right !important; font-size:18px;">	
												</table>				
						</td>			
						</tr>
						<tr>
 										<td>
											<div id="pos-transactions-form"  title="შეჩერებული ტრანზაქციები" style="margin-left:10px; border-top:6px ridge; padding:10px;"> 
										    </div>
										</td>
										
						</tr>
					</table>	
			     </td>
			   </tr>
			   <tr>
					<td>
						<div id="sale_details" style="margin-left:10px;">
								<table id="sales_items">
									<tr>
										<td class="left" style="height: 40px !important;"><pre style="font-size: 16px; margin-top: 8px;">რაოდენობა:        <span id="prod-quantity">0</span> ც</pre></td>			
									</tr>
								</table>
								<table id="sales_items_total">
									<tr>
										<td class="left" style="height: 40px !important;"><pre style="font-size: 16px; margin-top: 10px;">ჯამი:                	 <span id="sum-price">0.00</span> ლ</pre></td>
									</tr>
								</table>
						</div>
					</td>			   
			   </tr>
			</table>
		</div>
	</div>
</body>
</html>